package com.hd.hdxgddtools.mybatis;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.hd.hdxgddtools.mybatis.config.AutoGenerator;

import java.io.File;
import java.io.IOException;

/**
 * Description : mybatis-plus 代码生成器
 */
public class Generator {

    public static void main(String[] args) throws IOException {
        File file = new File("hdxgdd-tools/src/main/resources/generator.json");
        ObjectMapper mapper = new ObjectMapper();
        AutoGenerator generator = mapper.readValue(file, AutoGenerator.class);
        String project = System.getProperty("user.dir");
        //  generator.getStrategy().setInclude(null);
        generator.toAutoGenerator(project)
                .execute();
    }


}
